package com.geeksaga.dao.jdbc;

import javax.sql.DataSource;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.context.support.MessageSourceAccessor;
import org.springframework.jdbc.core.support.JdbcDaoSupport;
import org.springframework.stereotype.Component;

/**
 * @author newbie
 * @since 0.1
 */
@Component
public abstract class BaseJdbcDao extends JdbcDaoSupport {
	@Autowired private MessageSourceAccessor messageSourceAccessor;

    public MessageSourceAccessor getMessageSourceAccessor() {
		return messageSourceAccessor;
	}
	
	@Autowired
	public void initDataSource(@Qualifier("dataSource")DataSource dataSource) {
		super.setDataSource(dataSource);
	}
}